<?php
	class MessageModel extends Model {
		protected $tableName='message';
		
		public function fetchmessage($uid){
			$sql='select * from '.$this->tableName.' where uid='.$uid;
			$res=mysql_query($sql) or die(mysql_error());
			$data=array();
			while ($row=mysql_fetch_assoc($res)) {
				$data[]=$row;
			}
			return $data;
		}
	}
?>